package cn.highedu.spring.bean;

/**
 * 单例模式
 */
public class LegacySingleton {
    private static LegacySingleton instance;
    private LegacySingleton() {}
    public static synchronized LegacySingleton getInstance() {
        if(instance == null){
            instance = new LegacySingleton();
        }
        return instance;
    }
}
